package com.handpay.zztong.hp.swiper.model;

import android.os.Parcel;

import com.handpay.zztong.hp.bean.ResponseBean;

import java.util.List;

/**
 * Created by lyang on 2017/2/23.
 */

public class BusinessControlSwitch extends ResponseBean {

    private List<ListBean> list;

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public static class ListBean implements android.os.Parcelable {
        /**
         * isOpen : 0
         * switchType : 4
         */

        private int isOpen;
        private int switchType;

        public int getIsOpen() {
            return isOpen;
        }

        public void setIsOpen(int isOpen) {
            this.isOpen = isOpen;
        }

        public int getSwitchType() {
            return switchType;
        }

        public void setSwitchType(int switchType) {
            this.switchType = switchType;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.isOpen);
            dest.writeInt(this.switchType);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.isOpen = in.readInt();
            this.switchType = in.readInt();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeTypedList(this.list);
    }

    public BusinessControlSwitch() {
    }

    protected BusinessControlSwitch(Parcel in) {
        super(in);
        this.list = in.createTypedArrayList(ListBean.CREATOR);
    }

    public static final Creator<BusinessControlSwitch> CREATOR = new Creator<BusinessControlSwitch>() {
        @Override
        public BusinessControlSwitch createFromParcel(Parcel source) {
            return new BusinessControlSwitch(source);
        }

        @Override
        public BusinessControlSwitch[] newArray(int size) {
            return new BusinessControlSwitch[size];
        }
    };
}
